var t = getApp();

require("../../A4730AC3A71FB5DFC21562C4223CA4D1.js");

Page({
    data: {
        clothing: null,
        details: [],
        isLogining: !1,
        position: ""
    },
    onLoad: function(i) {
        var a = i.clothing;
        a || (a = 1), a *= 1;
        var o = this.getDetails(t.globalData.defaultClothingData, a);
        this.setData({
            clothing: a,
            details: o,
            position: i.position
        });
    },
    getDetails: function(t, i) {
        var a = [], o = !0, n = !1, l = void 0;
        try {
            for (var e, r = t[Symbol.iterator](); !(o = (e = r.next()).done); o = !0) {
                var s = e.value;
                1 * s.id == 1 * i && (a = s.details);
            }
        } catch (t) {
            n = !0, l = t;
        } finally {
            try {
                !o && r.return && r.return();
            } finally {
                if (n) throw l;
            }
        }
        return a;
    },
    navToDiy: function() {
        wx.navigateTo({
            url: "/pages/diy/diy?clothing=" + this.data.clothing + "&position=" + this.data.position
        });
    }
});